package com.space.domain.core.entity;

import org.mapstruct.MapperConfig;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.NullValueMappingStrategy;
import org.mapstruct.factory.Mappers;

/**
 * @author <a href="mailto:414563035@qq.com">Bedroom</a>
 * @date 2021/5/31 3:44 下午
 */
@MapperConfig(
        nullValueMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT
)
public interface Converter {
    Converter INSTANCE = Mappers.getMapper(Converter.class);

    @Mappings({
            @Mapping(source = "userId", target = "userId.userId"),
    })
    A toEntity(ADo userInfoDO);
}
